package com.xbenben.bean;

/**
 * @author xbenbenx
 * Date:2022/10/17 14:28
 **/
public class Test7 extends Test6 {

    //静态变量
    static String a = lcyhh();
    //静态变量
    static String a1 = lcyhh();

    //静态语句块
    static {
        System.out.println("子类静态语句块1");
    }

    //静态语句块
    static {
        System.out.println("子类静态语句块2");
    }

    //静态语句块
    static {
        System.out.println("子类静态语句块3");
    }

    //非静态变量
    String b = ppplcy();
    //非静态变量
    String b2 = ppplcy();

    //非静态语句块
    {
        System.out.println("子类非静态语句块1");
    }

    //非静态语句块
    {
        System.out.println("子类非静态语句块2");
    }

    //构造函数
    public Test7() {
        System.out.println("子类构造函数");
    }

    public static String lcyhh() {
        System.out.println("子类静态变量");
        return "静态变量";
    }

    public static String lcyhh1() {
        System.out.println("子类静态变量");
        return "静态变量2";
    }

    public static void bTest() {
        System.out.println("子类静态方法");
    }

    public static void main(String[] args) {
        Test7 test7 = new Test7();
    }

    public String ppplcy() {
        System.out.println("子类非静态变量");
        return "子类非静态变量";
    }

    public String ppplcy2() {
        System.out.println("子类非静态变量");
        return "子类非静态变量2";
    }

    @Override
    public void bDisplay() {
        System.out.println("子类非静态方法");
    }

}
